include(../../common/common.pri)
QT += widgets core dbus

TEMPLATE = lib
TARGET = peony-vfs-kylin-multiterminal

CONFIG += plugin no_keywords c++11
CONFIG += qt warn_on
CONFIG += debug
CONFIG += link_pkgconfig
PKGCONFIG += gio-2.0 glib-2.0

INCLUDEPATH += /usr/include/peony-qt/
LIBS += -L /usr/lib -lpeony

DEFINES += QT_DEPRECATED_WARNINGS

!system($$PWD/translations/generate_translations_pm.sh): error("Failed to generate pm")

TRANSLATIONS += $$PWD/translations/kylin-connectivity_en.ts \
                translations/peony-vfs-kylin-multiterminal_zh_CN.ts
QM_FILES_INSTALL_PATH = /usr/share/kylin-connectivity/translations/

target.source  += $$TARGET
#target.path = /usr/lib/peony-qt-extensions
target.path = $$[QT_INSTALL_LIBS]/peony-extensions

translationsFiles.files += $$PWD/translations/*.qm
translationsFiles.path = /usr/share/kylin-connectivity/translations/

INSTALLS += target \
         translationsFiles

SOURCES += \
    multiterminal-vfs-register.cpp \
    multiterminal-vfs-file.cpp \
    multiterminal-vfs-file-enumerator.cpp \
    multiterminal-vfs-file-monitor.cpp \
    multiterminal-vfs-dbus-interface.cpp \
    peony-vfs-multiterminal.cpp

HEADERS += \
    multiterminal-vfs-register.h \
    multiterminal-vfs-file.h \
    multiterminal-vfs-file-enumerator.h \
    multiterminal-vfs-file-monitor.h \
    multiterminal-vfs-dbus-interface.h \
    peony-vfs-multiterminal.h

TRANSLATIONS += translations/peony-vfs-kylin-multiterminal_zh_CN.ts

DISTFILES += peony-vfs-kylin-multiterminal.json
